/**
 * Copyright (C) 2021 - 2031 O-Cubes Co., Ltd.
 */

/****************************************************************
 *  @file    device_spi.h
 *  @brief   Designware spi device header file
 *  @version v1.0
 *  @date    03. Apr. 2023
 *  @author  liuchao
 ****************************************************************/

#ifndef __DEVICE_SPI_H__
#define __DEVICE_SPI_H__

#include "dev_spi.h"

/**
 * \name	DesignWare SPI Object Number
 * @{
 */
#define DW_SPI_NUM              (4)     /*!< DesignWare SPI valid number */
/** @} end of name */

/**
 * \name	Designware SPI Object ID Macros
 * @{
 */
#define DW_SPI_0_ID             0       /*!< SPI 0 id macro */
#define DW_SPI_1_ID             1       /*!< SPI 1 id macro */
#define DW_SPI_2_ID             2       /*!< SPI 2 id macro */
#define DW_SPI_3_ID             3       /*!< SPI 2 id macro */

/** @} end of name */

/**
 * \name	Designware SPI Object Control Macros
 * @{
 */
#define USE_DW_SPI_0            1       /*!< enable use designware SPI 0 */
#define USE_DW_SPI_1            1       /*!< enable use designware SPI 1 */
#define USE_DW_SPI_2            1       /*!< enable use designware SPI 2 */
#define USE_DW_SPI_3            1       /*!< enable use designware SPI 2 */


#define DW_SPI_DEFAULT_FREQ     1000000

/** @} end of name */

#ifdef __cplusplus
extern "C" {
#endif


#ifdef __cplusplus
}
#endif

#endif /* __DEVICE_SPI_H__ */
